{% extends 'base.html' %}

{% block title %} Login {% endblock title %}

{% block content %}
<div id="wrapper">
        <h2>Log in to the site</h2>
        <div class="line"></div>
        <p style="margin-bottom: 20%;">Please, use the following form to log in</p>
        <form id="signin" autocomplete="off" action="{% url 'login' %}" method="POST">
            {% csrf_token %}
            {% for field in form %}
                {% if field.errors %}
                    <p >{{ field.errors }}</p>
                {% endif %}
                {{ field }}
            {% endfor %}
            <input type="hidden" name="next" value="{{ next }}" />
            <button type="submit">></button>
            <p>forgot your password? <a href="{% url 'password_reset' %}">click here</a></p>
        </form>

</div>
{% endblock content %}


        <form action="{% url 'password_reset' %}" method="POST">
            {% csrf_token %}
            <div>
                {% for field in form %}
                    <div class="fields">
                        {% if field.errors %}
                            <div class="field-errors">{{ field }}</div>
                        {% else %}
                            {{ field.label }}
                            {{ field }}
                        {% endif %}
                    </div>
                {% endfor %}
            </div>
            
            <button type="submit" class="btn btn-success">Send by email</button>
        </form>
    </div>
